import request from '@/utils/request2'

// 查询学生班级关联列表
export function listStuClassRelation(query) {
  return request({
    url: '/stuManage/stuClassRelation/list',
    method: 'get',
    params: query
  })
}

// 查询学生班级关联详细
export function getStuClassRelation(id) {
  return request({
    url: '/stuManage/stuClassRelation/' + id,
    method: 'get'
  })
}

// 查询学生班级关联详细
export function updateStuLatestClassRelation(stuId) {
  return request({
    url: '/stuManage/stuClassRelation/asyncStuClassInfo/' + stuId,
    method: 'get'
  })
}

// 根据学生id查询学生班级关联详细
export function getStuClassRelationByStuId(stuId) {
  return request({
    url: '/stuManage/stuClassRelation/getInfoByStuId/' + stuId,
    method: 'get'
  })
}

// 新增学生班级关联
export function addStuClassRelation(data) {
  return request({
    url: '/stuManage/stuClassRelation',
    method: 'post',
    data: data
  })
}

// 修改学生班级关联
export function updateStuClassRelation(data) {
  return request({
    url: '/stuManage/stuClassRelation',
    method: 'put',
    data: data
  })
}

// 删除学生班级关联
export function delStuClassRelation(id) {
  return request({
    url: '/stuManage/stuClassRelation/' + id,
    method: 'delete'
  })
}
